package com.example.demo.service;

import com.example.demo.bean.Node;
import com.example.demo.mapper.NodeMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class NodeService {

    private static final Logger log = LoggerFactory.getLogger(NodeService.class);

    private final NodeMapper m;

    @Autowired
    public NodeService(NodeMapper m) {
        this.m = m;
    }

    public Node getNodeByTitle(String title) {
        return m.findByTitle(title);
    }

}